GtkScrolledWindow: Disconnect from frame clock properly
authorBastien Nocera <hadess@hadess.net>
Tue, 22 Oct 2013 16:45:00 +0000 (18:45 +0200)
committerBastien Nocera <hadess@hadess.net>
Wed, 23 Oct 2013 13:22:31 +0000 (15:22 +0200)
The tick callback IDs from GtkWidget aren't timeouts, so
use the correct function to disconnect from them.

Spotted by Benjamin Otte <otte@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=710666

gtk/gtkscrolledwindow.c

index e60058b5e9f19f45638a81d8b8adc92af92c49bd..56cf66296835a218203e46fc51b8c0e3c9d9a6bb 100644 (file)
@@ -1080,7 +1080,7 @@ gtk_scrolled_window_set_kinetic_scrolling (GtkScrolledWindow *scrolled_window,
         }
       if (priv->deceleration_id)
         {
-          g_source_remove (priv->deceleration_id);
+          gtk_widget_remove_tick_callback (GTK_WIDGET (scrolled_window), priv->deceleration_id);
           priv->deceleration_id = 0;
         }
     }
@@ -1187,7 +1187,7 @@ gtk_scrolled_window_destroy (GtkWidget *widget)
     }
   if (priv->deceleration_id)
     {
-      g_source_remove (priv->deceleration_id);
+      gtk_widget_remove_tick_callback (widget, priv->deceleration_id);
       priv->deceleration_id = 0;
     }